home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / w3.info-3 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  48.5 KB  |  1,197 lines

  1. This is Info file ../info/w3.info, produced by Makeinfo-1.63 from the
  2. input file w3.texi.
  3.  
  4.    This file documents the Emacs-w3 World Wide Web browser.
  5.  
  6.    Copyright (C) 1993, 1994, 1995 William M. Perry
  7.  
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.  
  12. 
  13. File: w3.info,  Node: Mailcap File,  Prev: Specifying Viewers,  Up: MIME Support
  14.  
  15. Mailcap File
  16. ============
  17.  
  18.    NCSA Mosaic and almost all other WWW browsers rely on a separate file
  19. for mapping MIME types to external viewing programs.  This takes some of
  20. the burden off of browser developers, so each browser does not have to
  21. support all image formats, or postscript, etc.  Instead of having the
  22. users of Emacs-w3 duplicate this in lisp, this file can be parsed using
  23. the `mm-parse-mailcaps' function.  This function is called each time w3
  24. is loaded.  It tries to locate mimetype files in several places. If the
  25. environment variable `MAILCAPS' is nonempty, then this is assumed to
  26. specify a UNIX-like path of mimetype files (this is a colon separated
  27. string of pathnames).  If the `MAILCAPS' environment variable is empty,
  28. then Emacs-w3 looks for these files:
  29.  
  30.   1. `~/.mailcap'
  31.  
  32.   2. `/etc/mailcap'
  33.  
  34.   3. `/usr/etc/mailcap'
  35.  
  36.   4. `/usr/local/etc/mailcap'
  37.  
  38.    This format of this file is specified in RFC 1343, but a brief
  39. synopsis follows (this is taken verbatim from sections of RFC 1343).
  40.  
  41.    Each mailcap file consists of a set of entries that describe the
  42. proper handling of one media type at the local site.  For example, one
  43. line might tell how to display a message in Group III fax format.  A
  44. mailcap file consists of a sequence of such individual entries,
  45. separated by newlines (according to the operating system's newline
  46. conventions). Blank lines and lines that start with the "#" character
  47. (ASCII 35) are considered comments, and are ignored.  Long entries may
  48. be continued on multiple lines if each non-terminal line ends with a
  49. backslash character ('\', ASCII 92), in which case the multiple lines
  50. are to be treated as a single mailcap entry.  Note that for such
  51. "continued" lines, the backslash must be the last character on the line
  52. to be continued.
  53.  
  54.    Each mailcap entry consists of a number of fields, separated by
  55. semi-colons.  The first two fields are required, and must occur in the
  56. specified order.  The remaining fields are optional, and may appear in
  57. any order.
  58.  
  59.    The first field is the content-type, which indicates the type of data
  60. this mailcap entry describes how to handle.  It is to be matched against
  61. the type/subtype specification in the "Content-Type" header field of an
  62. Internet mail message.  If the subtype is specified as "*", it is
  63. intended to match all subtypes of the named content-type.
  64.  
  65.    The second field, view-command, is a specification of how the
  66. message or body part can be viewed at the local site.  Although the
  67. syntax of this field is fully specified, the semantics of program
  68. execution are necessarily somewhat operating system dependent.
  69.  
  70.    The optional fields, which may be given in any order, are as follows:
  71.    * The "compose" field may be used to specify a program that can be
  72.      used to compose a new body or body part in the given format.  Its
  73.      intended use is to support mail composing agents that support the
  74.      composition of multiple types of mail using external composing
  75.      agents.  As with the view- command, the semantics of program
  76.      execution are operating system dependent.  The result of the
  77.      composing program may be data that is not yet suitable for mail
  78.      transport--that is, a Content-Transfer-Encoding may need to be
  79.      applied to the data.
  80.  
  81.    * The "composetyped" field is similar to the "compose" field, but is
  82.      to be used when the composing program needs to specify the
  83.      Content-type header field to be applied to the composed data.  The
  84.      "compose" field is simpler, and is preferred for use with existing
  85.      (non-mail-oriented) programs for composing data in a given format.
  86.      The "composetyped" field is necessary when the Content-type
  87.      information must include auxilliary parameters, and the
  88.      composition program must then know enough about mail formats to
  89.      produce output that includes the mail type information.
  90.  
  91.    * The "edit" field may be used to specify a program that can be used
  92.      to edit a body or body part in the given format.  In many cases,
  93.      it may be identical in content to the "compose" field, and shares
  94.      the operating-system dependent semantics for program execution.
  95.  
  96.    * The "print" field may be used to specify a program that can be
  97.      used to print a message or body part in the given format.  As with
  98.      the view-command, the semantics of program execution are operating
  99.      system dependent.
  100.  
  101.    * The "test" field may be used to test some external condition (e.g.
  102.      the machine architecture, or the window system in use) to
  103.      determine whether or not the mailcap line applies.  It specifies a
  104.      program to be run to test some condition.  The semantics of
  105.      execution and of the value returned by the test program are
  106.      operating system dependent.  If the test fails, a subsequent
  107.      mailcap entry should be sought.  Multiple test fields are not
  108.      permitted--since a test can call a program, it can already be
  109.      arbitrarily complex.
  110.  
  111.    * The "needsterminal" field indicates that the view-command must be
  112.      run on an interactive terminal.  This is needed to inform
  113.      window-oriented user agents that an interactive terminal is
  114.      needed.  (The decision is not left exclusively to the view-command
  115.      because in some circumstances it may not be possible for such
  116.      programs to tell whether or not they are on interactive
  117.      terminals.)  The needsterminal command should be assumed to apply
  118.      to the compose and edit commands, too, if they exist.  Note that
  119.      this is NOT a test--it is a requirement for the environment in
  120.      which the program will be executed, and should typically cause the
  121.      creation of a terminal window when not executed on either a real
  122.      terminal or a terminal window.
  123.  
  124.    * The "copiousoutput" field indicates that the output from the
  125.      view-command will be an extended stream of output, and is to be
  126.      interpreted as advice to the UA (User Agent mail- reading program)
  127.      that the output should be either paged or made scrollable. Note
  128.      that it is probably a mistake if needsterminal and copiousoutput
  129.      are both specified.
  130.  
  131.    * The "description" field simply provides a textual description,
  132.      optionally quoted, that describes the type of data, to be used
  133.      optionally by mail readers that wish to describe the data before
  134.      offering to display it.
  135.  
  136.    * The "x11-bitmap" field names a file, in X11 bitmap (xbm) format,
  137.      which points to an appropriate icon to be used to visually denote
  138.      the presence of this kind of data.
  139.  
  140.    * Any other fields beginning with "x-" may be included for local or
  141.      mailer-specific extensions of this format.  Implementations should
  142.      simply ignore all such unrecognized fields to permit such
  143.      extensions, some of which might be standardized in a future
  144.      version of this document.
  145.  
  146. 
  147. File: w3.info,  Node: Security,  Next: Non-Unix Operating Systems,  Up: Top
  148.  
  149. Security
  150. ********
  151.  
  152. * Menu:
  153.  
  154. * Basic::               The 'Basic' authentication scheme for HTTP/1.0
  155. * Digest::              The 'Digest' authentication scheme for HTTP/1.0
  156. * SSL::                 Secure Sockets Layer from Netscape, and how to
  157.                         enable it in Emacs-w3.
  158. * PGP/PEM::             Using PGP/PEM to encrypt information
  159.  
  160.    There are an increasing number of ways to authenticate yourself to a
  161. web servivce.  Emacs-w3 tries to support as many as possible.
  162.  
  163. 
  164. File: w3.info,  Node: Basic,  Next: Digest,  Prev: Security,  Up: Security
  165.  
  166. HTTP/1.0 Basic Authentication
  167. =============================
  168.  
  169.    The weakest authentication available, not recommended if you are at
  170. all serious about security on your web site.  This is simply a string
  171. that looks like `user:password' that has been Base64 encoded, as
  172. defined in RFC 1421.  It is given as an example of how to write an
  173. authorization module.  All of the functions for storing, retrieving,
  174. and over-writing the cached authorization information should all be
  175. handled by one function (although it would be perfectly acceptable to
  176. have a stub function that passed off to three larger functions based on
  177. its parameters).  The most efficient way to store the cached
  178. information is by an assoc-list of assoc-lists.  The top level assoc
  179. list is keyed on the name of the server.  The secondary assoc-list is
  180. keyed on the full path of the file that is protected.  Thus, a sample
  181. authorization cache would look like this:
  182.  
  183.      ((``info.cern.ch''    . ((``/foo''        . ``d21wZXJyeTp0ZXN0aW5n'')
  184.                               (``/bar''        . ``amtvbnJhdGg6ZGlzbWVtYmVy'')
  185.                               (``/foo/x.html'' . ``dmlvbGV0dDpvcGVuZ2w='')))
  186.       (``cs.indiana.edu''  . ((``/elisp/w3/''  . ``dGxvb3M6Y29ucXVlcg=='')
  187.                               (``/''           . ``bXZhbmhleW46a2lsbGh1bGljaw=='')))
  188.      )
  189.  
  190.    The structure consists of two assoc-lists for the sake of speed.  The
  191. list of cached information could conceivably hold several thousand links
  192. (if the user does not exit Emacs for long periods of time.)  If the list
  193. were keyed on a full URL, the assoc function would have to search
  194. through every link before failing to find a new URL.  With the current
  195. scheme, assoc only has to search though a few items (maximum is the
  196. number of HTTP servers, which should always be much, much smaller than
  197. the number of distinct URLs.)  Even with a 3:1 ratio of URLs to each
  198. server, this is a big win.
  199.  
  200. 
  201. File: w3.info,  Node: Digest,  Next: SSL,  Prev: Basic,  Up: Security
  202.  
  203. HTTP/1.0 Digest Authentication
  204. ==============================
  205.  
  206.    Jeffery L. Hostetler, John Franks, Philip Hallam-Baker, Ari Luotonen,
  207. Eric W. Sink, and Lawrence C. Stewart have an internet draft for a new
  208. authentication mechanism.  For the complete specification, please see
  209. draft-ietf-http-digest-aa-01.txt in your nearest internet drafts
  210. archive(1).  What follows is mainly taken from the March 24, 1995
  211. version of the internet draft.
  212.  
  213.    The protocol referred to as "HTTP/1.0" includes specification for a
  214. Basic Access Authentication scheme.  This scheme is not considered to
  215. be a secure method of user authentication, as the user name and password
  216. are passed over the network in an unencrypted form.  A specification for
  217. a new authentication scheme is needed for future versions of the HTTP
  218. protocol.  This document provides specification for such a scheme,
  219. referred to as "Digest Access Authentication".
  220.  
  221.    The Digest Access Authentication scheme is not intended to be a
  222. complete answer to the need for security in the World Wide Web.  This
  223. scheme provides no encryption of object content.  The intent is simply
  224. to facilitate secure access authentication.
  225.  
  226.    Like Basic Access Authentication, the Digest scheme is based on a
  227. simple challenge-response paradigm.  The Digest scheme challenges using
  228. a nonce value.  A valid response contains the MD5 checksum of the
  229. password and the given nonce value.  In this way, the password is never
  230. sent in the clear.  Just as with the Basic scheme, the username and
  231. password must be prearranged in some fashion.
  232.  
  233.    If a server receives a request for an access-protected object, and an
  234. acceptable Authorizatation header is not sent, the server responds with:
  235.  
  236.      HTTP/1.1 401 Unauthorized
  237.      WWW-Authenticate: Digest realm="<realm>",
  238.                                  domain="<domain>",
  239.                                  nonce="<nonce>",
  240.                                  opaque="<opaque>",
  241.                                  stale="<TRUE | FALSE>"
  242.  
  243.    The meanings of the identifers used above are as follows:
  244.  
  245. `<realm>'
  246.      A name given to users so they know which username and password to
  247.      send.
  248.  
  249. `<domain>  OPTIONAL'
  250.      A comma separated list of URIs, as specified for HTTP/1.0.  The
  251.      intent is that the client could use this information to know the
  252.      set of URIs for which the same authentication information should
  253.      be sent.  The URIs in this list may exist on different servers.
  254.      If this keyword is omitted or empty, the client should assume that
  255.      the domain consists of all URIs on the responding server.
  256.  
  257. `<nonce>'
  258.      A server-specified integer value which may be uniquely generated
  259.      each time a 401 response is made.  Servers may defend themselves
  260.      against replay attacks by refusing to reuse nonce values.  The
  261.      nonce should be considered opqaue by the client.
  262.  
  263. `<opaque>  OPTIONAL'
  264.      A string of data, specified by the server, which should returned
  265.      by the client unchanged.  It is recommended that this string be
  266.      base64 or hexadecimal data.  Specifically, since the string is
  267.      passed in the header lines as a quoted string, the double-quote
  268.      character is not allowed.
  269.  
  270. `<stale>   OPTIONAL'
  271.      A flag, indicating that the previous request from the client was
  272.      rejected because the nonce value was stale.  If stale is TRUE, the
  273.      client may wish to simply retry the request with a new encrypted
  274.      response, without reprompting the user for a new username and
  275.      password.
  276.  
  277.    The client is expected to retry the request, passing an Authorization
  278. header line as follows:
  279.  
  280.      Authorization: Digest
  281.                 username="<username>",             -- required
  282.                 realm="<realm>",                   -- required
  283.                 nonce="<nonce>",                   -- required
  284.                 uri="<requested-uri>",             -- required
  285.                 response="<digest>",               -- required
  286.                 message="<message-digest>",        -- OPTIONAL
  287.                 opaque="<opaque>"                  -- required if provided by server
  288.      
  289.              where <digest> := H( H(A1) + ":" + N + ":" + H(A2) )
  290.        and <message-digest> := H( H(A1) + ":" + N + ":" + H(<message-body>) )
  291.      
  292.              where:
  293.      
  294.                      A1 := U + ':' + R + ':' + P
  295.                      A2 := <Method> + ':' + <requested-uri>
  296.      
  297.                      with:
  298.                              N -- nonce value
  299.                              U -- username
  300.                              R -- realm
  301.                              P -- password
  302.                              <Method> -- from header line 0
  303.                              <requested-uri> -- uri sans proxy/routing
  304.  
  305.    Where H() is the RSA Data Security, Inc. MD5 Message-Digest Algorithm
  306. (2).
  307.  
  308.    Upon receiving the Authorization information, the server may check
  309. its validity by looking up its known password which corresponds to the
  310. submitted <username>.  Then, the server must perform the same MD5
  311. operation performed by the client, and compare the result to the given
  312. <response>.
  313.  
  314.    Note that the HTTP server does not actually need to know the user's
  315. clear text password.  As long as H(A1) is available to the server, the
  316. validity of an Authorization header may be verified.
  317.  
  318.    All keyword-value pairs must be expressed in characters from the
  319. US-ASCII character set, excluding control characters.
  320.  
  321.    ---------- Footnotes ----------
  322.  
  323.    (1)  One is ftp://ds.internic.net/internet-drafts
  324.  
  325.    (2)  RFC 1321.  R.Rivest, "The MD5 Message-Digest Algorithm",
  326. http://ds.internic.net/rfc/rfc1321.txt, April 1992.
  327.  
  328. 
  329. File: w3.info,  Node: SSL,  Next: PGP/PEM,  Prev: Digest,  Up: Security
  330.  
  331. SSL
  332. ===
  333.  
  334.    SSL is the `Secure Sockets Layer' interface developed by Netscape
  335. Communications (1).
  336.  
  337.    In order to use SSL in Emacs-w3, you will need one of the reference
  338. implementations of SSL that are publicly available.  These are the
  339. implementations that I am aware of:
  340.  
  341. `SSLRef 2.0'
  342.      Available from Netscape Communications at
  343.      http://www.netscape.com/newsref/std/sslref.html.  This requires the
  344.      RSARef library, which is not exportable.  The RSARef library is
  345.      available from ftp://ftp.rsa.com/rsaref/
  346.  
  347. `SSLeay 0.4'
  348.      An implementation by Eric Young (eay@mincom.oz.au) that is free for
  349.      commerial or noncommercial use, and was developed completely
  350.      outside the US by a non-US citizen.  More information can be found
  351.      at ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL/
  352.  
  353.    Whichever reference implementation you choose to download (I
  354. recommend the SSLeay distribution, just to thumb a nose at the NSA :),
  355. you must have a program you can run in a subprocess that takes a
  356. hostname and port number on the command line, and reads/writes to
  357. standard input/output (the Netscape implementation comes with one of
  358. these by default).  Once you hvae this program, set the variable
  359. `ssl-program-name' to point to the executable.
  360.  
  361.    This should be all you need to do.  In the future, I will be
  362. distributing a set of patches to Emacs 19.xx and XEmacs 19.xx to
  363. SSL-enable them, for the sake of speed.
  364.  
  365.    NOTE: This implementation does not support the use of client
  366. certificates, but then nobody else supports that area of the protocol
  367. either, so I'm not too worried about it.
  368.  
  369.    ---------- Footnotes ----------
  370.  
  371.    (1)  http://www.netscape.com/
  372.  
  373. 
  374. File: w3.info,  Node: PGP/PEM,  Prev: SSL,  Up: Security
  375.  
  376. PGP/PEM
  377. =======
  378.  
  379.    Most of this section was taken from the documentation written by Rob
  380. McCool robm@ncsa.uiuc.edu.  Gratefully reproduced here with permission
  381. from him.(1).
  382.  
  383.    RIPEM is 'Riordan's Internet Privacy Enhanced Mail', and is
  384. currently on version 1.2b3.  US citizens can ftp it from
  385. ripem.msu.edu:/pub/crypt/ripem.
  386.  
  387.    PGP is 'Pretty Good Privacy', and is currently on version 2.6.  The
  388. legal controversies that plagued earlier versions have been resolved, so
  389. this is a competely legal program now.  There is also a legal version
  390. for european users, called 2.6ui (the Unofficial International version).
  391.  
  392.    PGP and PEM are programs to allow you and a second party to
  393. communicate in a way which does not allow third parties to read them,
  394. and which certify that the person who sent the message is really who
  395. they claim they are.
  396.  
  397.    PGP and PEM both use RSA encryption.  The U.S.  government has strict
  398. export controls over foreign use of this technology, so people outside
  399. the U.S.  may have a difficult time finding programs which perform the
  400. encryption.
  401.  
  402.    You will need a working copy of either Pretty Good Privacy or RIPEM
  403. to begin with.  You should be familiar with the program and have
  404. generated your own public/private key pair.  You should be able to use
  405. the TIS/PEM program with the PEM authorization type.  I haven't tried
  406. it.  This tutorial is written assuming that you are using RIPEM.
  407.  
  408.    Currently, the protocol has been implemented with PEM and PGP using
  409. local key files on the server side, and on the client side with PEM
  410. using finger to retrieve the server's public key.
  411.  
  412.    As you can tell, parties who wish to use Emacs-w3 and httpd with PEM
  413. or PGP encryption will need to communicate beforehand and find a
  414. tamper-proof way to exchange their public keys.
  415.  
  416.    Pioneers get shot full of arrows.  This work is currently in the
  417. experimental stages and thus may have some problems that I have
  418. overlooked.  The only known problem that I know about is that the
  419. messages are currently not timestamped.  This means that a malicious
  420. user could record your encrypted message with a packet sniffer and
  421. repeat it back to the server ad nauseum.  Although they would not be
  422. able to read the reply, if the request was something you were being
  423. charged for, you may have a large bill to pay by the time they're
  424. through.
  425.  
  426.    This protocol is almost word-for-word a copy of Tony Sander's RIPEM
  427. based scheme, generalized a little.  Below, wherever you see PEM you can
  428. replace it with PGP and get the same thing.
  429.  
  430.      *Client:*
  431.      
  432.      GET /docs/protected.html HTTP/1.0
  433.      UserAgent: Emacs-W3/2.1.x
  434.      
  435.      *Server:*
  436.      
  437.      HTTP/1.0 401 Unauthorized
  438.      WWW-Authenticate: PEM entity="webmaster@hoohoo.ncsa.uiuc.edu"
  439.      Server: NCSA/1.1
  440.      
  441.      *Client:*
  442.      
  443.      GET / HTTP/1.0
  444.      Authorization: PEM entity="robm@ncsa.uiuc.edu"
  445.      Content-type: application/x-www-pem-request
  446.      
  447.      --- BEGIN PRIVACY-ENHANCED MESSAGE ---
  448.      this is the real request, encrypted
  449.      --- END PRIVACY-ENHANCED MESSAGE ---
  450.      
  451.      *Server:*
  452.      
  453.      HTTP/1.0 200 OK
  454.      Content-type: application/x-www-pem-reply
  455.      
  456.      --- BEGIN PRIVACY-ENHANCED MESSAGE ---
  457.      this is the real reply, encrypted
  458.      --- END PRIVACY-ENHANCED MESSAGE ---
  459.      That's it.
  460.  
  461.    Emacs-w3 uses the excellent mailcrypt package written by Jin S Choi
  462. jsc@mit.edu.(2).  This package takes care of calling ripem and/or pgp
  463. with the correct arguments.  Please see the documentation at the top of
  464. mailcrypt.el for instructions on using mailcrypt.  All bug reports
  465. about mailcrypt should go to Jin S Choi, but bugs about how I use it in
  466. Emacs-w3 should of course be directed to me.
  467.  
  468.    ---------- Footnotes ----------
  469.  
  470.    (1)  See http://hoohoo.ncsa.uiuc.edu/docs/PEMPGP.html
  471.  
  472.    (2)  Available via anonymous ftp to archive.cis.ohio-state.edu in
  473. /pub/gnu/emacs/elisp-archive/interfaces/mailcrypt.el.Z
  474.  
  475. 
  476. File: w3.info,  Node: Non-Unix Operating Systems,  Next: VMS,  Prev: Security,  Up: Top
  477.  
  478. Non-Unix Operating Systems
  479. **************************
  480.  
  481. * Menu:
  482.  
  483. * VMS::                 The wonderful world of VAX|AXP-VMS!
  484. * OS/2::                The next-best thing to Unix.
  485. * MS-DOS::              The wonderful world of MS-DOG!
  486. * 16-Bit Windows::      Windows 3.1, 3.11, and WFW 3.11.
  487. * 32-Bit Windows::      Windows NT, Chicago/Windows 95.
  488. * Macintosh::           The wonderful world of Macintrash!
  489. * Amiga::               The Amiga, for those who still love them.
  490.  
  491. 
  492. File: w3.info,  Node: VMS,  Next: OS/2,  Prev: Non-Unix Operating Systems,  Up: Non-Unix Operating Systems
  493.  
  494. VMS
  495. ===
  496.  
  497.    :: WORK ::
  498.  
  499. 
  500. File: w3.info,  Node: OS/2,  Next: MS-DOS,  Prev: VMS,  Up: Non-Unix Operating Systems
  501.  
  502. OS/2
  503. ====
  504.  
  505.    :: WORK ::
  506.  
  507. 
  508. File: w3.info,  Node: MS-DOS,  Next: 16-Bit Windows,  Prev: OS/2,  Up: Non-Unix Operating Systems
  509.  
  510. MS-DOS
  511. ======
  512.  
  513.    :: WORK ::
  514.  
  515. 
  516. File: w3.info,  Node: 16-Bit Windows,  Next: 32-Bit Windows,  Prev: MS-DOS,  Up: Non-Unix Operating Systems
  517.  
  518. 16-Bit Windows
  519. ==============
  520.  
  521.    :: WORK ::
  522.  
  523. 
  524. File: w3.info,  Node: 32-Bit Windows,  Next: Macintosh,  Prev: 16-Bit Windows,  Up: Non-Unix Operating Systems
  525.  
  526. 32-Bit Windows
  527. ==============
  528.  
  529.    :: WORK ::
  530.  
  531. 
  532. File: w3.info,  Node: Macintosh,  Next: Amiga,  Prev: 32-Bit Windows,  Up: Non-Unix Operating Systems
  533.  
  534. Macintosh
  535. =========
  536.  
  537.    :: WORK ::
  538.  
  539. 
  540. File: w3.info,  Node: Amiga,  Next: Advanced Features,  Prev: Macintosh,  Up: Non-Unix Operating Systems
  541.  
  542. Amiga
  543. =====
  544.  
  545.    :: WORK ::
  546.  
  547. 
  548. File: w3.info,  Node: Advanced Features,  Next: Style Sheets,  Prev: Amiga,  Up: Top
  549.  
  550. Advanced Features
  551. *****************
  552.  
  553. * Menu:
  554.  
  555. * Style Sheets::        Formatting control, the right way
  556. * Disk Caching::        Speeding performance by using a local disk cache
  557. * Searching::        How to search entire sections of the web
  558. * Interfacing to Mail/News::    How to make VM understand hypertext links
  559. * Debugging HTML::      How to make Emacs-w3 display warnings about invalid
  560.                         HTML/HTML+ constructs.
  561. * Native WAIS Support:: How to make Emacs-w3 understand WAIS links without
  562.                         using a gateway.
  563. * Rating Links::        How to make Emacs-w3 put an 'interestingness' value
  564.                         next to each link.
  565. * Gopher Plus Support:: How Emacs-w3 makes use of the Gopher+ protocol.
  566. * Hooks::               Various hooks to use throughout Emacs-w3
  567. * Other Variables::     Miscellaneous variables that control the real
  568.                         guts of Emacs-w3.
  569.  
  570. 
  571. File: w3.info,  Node: Style Sheets,  Next: Disk Caching,  Prev: Advanced Features,  Up: Advanced Features
  572.  
  573. Style Sheets
  574. ============
  575.  
  576.    Emacs-w3 currently supports the experimental style sheet mechanism
  577. proposed by H&kon W. Lie of the W3 Consortium.  This allows for the
  578. author to specify what a document should look like, and yet allow the
  579. end user to override any of the stylistic changes.  This allows for
  580. people with special needs (most notably the visually impaired) to
  581. override style bindings that could make a document totally unreadable.
  582.  
  583.    A stylesheet consists of comments and directives.  A comment is any
  584. line starting with a #, and is terminated by the end of the line.  A
  585. directive includes the tag name, an attribute name, and a value.  A
  586. sample stylesheet is:
  587.  
  588.      <style notation="experimental">
  589.      # This line is a comment
  590.      # These will be ignored, up the the terminating end-of-line
  591.      #
  592.      h1: align=center
  593.      h1: color.text=yellow
  594.      h1: color.background=red
  595.      h1: font.size *= 2
  596.      </style>
  597.  
  598.    Below is a comprehensive list of the attribute names.
  599. `color.text'
  600.      Specifies the foreground color of the text for this item.
  601.  
  602. `color.background'
  603.      Specifies the background color of the text for this item.
  604.  
  605. `background.bitmap'
  606.      Specifies a bitmap to be used as the background for this item.
  607.  
  608. `font.size'
  609.      Specifies the font size.  This can be specified with the +=, -=,
  610.      /=, or *=  operator, signifying a change from the default font
  611.      size.  For example, font.size *= 2 would mean a font twice as
  612.      large as the default font.
  613.  
  614. `font.style'
  615.      Specifies the font style.  This controls whether a font is bold,
  616.      italic, underlined, or any combination of these.  The value can be
  617.      a comma or ampersand (&) separated list of values.
  618.  
  619. `font.family'
  620.      Specifies the font family - this is the basic type of font.  Note
  621.      that not all font families will be available on all platforms, or
  622.      even the same platform in a slightly different configuration.  If
  623.      the specified font family cannot be found on the machine, the
  624.      default font is used instead.
  625.  
  626. `align'
  627.      Specifies how the text contained within the item is to be aligned.
  628.      Possible values are left, right, justify, center, or indent.
  629.  
  630. `width'
  631.      Specifies how wide the item should be.  This is only used for
  632.      horizontal rules (<HR>) tags right now.
  633.  
  634.    To include a stylesheet into your document, simply use the <style>
  635. tag.  You can use the notation attribute to specify what language the
  636. stylesheet is specified in.  The default is experimental.  The data
  637. between the <style> and </style> tags is the stylsheet proper - no HTML
  638. parsing is done to this data - it is treated similar to an <XMP> section
  639. of text.  To reference an external stylesheet, you should use the <link>
  640. tag.
  641.      <link rel="stylesheet" href="/bill.style">
  642.    If these two mechanisms are mixed, then the URL is resolved first,
  643. and the contents of the <style> tag take precedence if there are any
  644. conflicting directives.
  645.  
  646.    In the future, DSSSL and DSSSL-lite will be supported as valid
  647. stylesheet languages, but not in this release.
  648.  
  649. 
  650. File: w3.info,  Node: Disk Caching,  Next: Searching,  Prev: Style Sheets,  Up: Advanced Features
  651.  
  652. Disk Caching
  653. ============
  654.  
  655.    A cache stores the information on a page on your local machine.  When
  656. requesting a page that is in the cache, Emacs-w3 can retrieve the page
  657. from the cache more quickly than retrieving the page again from its
  658. location out on the network.  With a well-populated cache, the speed of
  659. browsing the web is dramatically increased.
  660.  
  661.    The first time a page is requested, Emacs-w3 retrieves the page from
  662. the network.  When requesting a page that is in the cache, Emacs-w3
  663. checks to see if the page has changed since it was last retrieved from
  664. the remote machine.  If it has not changed, the local copy is used,
  665. saving the transmission of the file over the network.
  666.  
  667.    To turn on disk caching, set the variable `url-automatic-caching' to
  668. non-`nil', or choose the 'Caching' menu item (under `Options').  That
  669. is all there is to it.  It is recommended that you use the
  670. `clean-cache' shell script fist, to allow for future cleaning of the
  671. cache.  This shell script will remove all files that have not been
  672. accessed since it was last run.  To keep the cache pared down, it is
  673. recommended that this script be run from at or cron (see the manual
  674. pages for crontab(5) or at(1) for more information)
  675.  
  676.    With a large cache of documents on the local disk, it can be very
  677. handy when traveling, or any other time the network connection is not
  678. active (a laptop with a dial-on-demand PPP connection, etc).  Emacs-w3
  679. can rely solely on its cache, and avoid checking to see if the page has
  680. changed on the remote server.  In the case of a dial-on-demand PPP
  681. connection, this will keep the phone line free as long as possible,
  682. only bringing up the PPP connection when asking for a page that is not
  683. located in the cache.  This is very useful for demonstrations as well.
  684. To turn this feature on, set the variable `url-standalone-mode' to
  685. non-`nil', or choose the `Use Cache Only' menu item (under `Options')
  686.  
  687.    Emacs-w3 caches files under the temporary directory specified by
  688. `url-temporary-directory', in a user-specific subdirectory (determined
  689. by the `user-real-login-name' function).  The cache files are stored
  690. under their original names, so a URL like:
  691. http://www.spry.com/foo/bar/baz.html would be stored in a cache file
  692. named: /tmp/wmperry/com/spry/www/foo/bar/baz.html.  Sometimes, espcially
  693. with gopher links, there will be name conflicts, and an error will be
  694. signalled.  This cannot be avoided, and still have reasonable
  695. performance at startup time (reading in an index file of all the cached
  696. pages can take a long time on slow machines, or even fast machines with
  697. large caches).  If you are running XEmacs 19.12 or later, you can use an
  698. alternate naming scheme that avoids name conflicts, but loses the human
  699. readability of the cache file names.  The cache files will look like:
  700. /tmp/wmperry/acbd18db4cc2f85cedef654fccc4a4d8, which is certainly
  701. unique, but not very user-friendly.  To turn this on, add this to your
  702. `.emacs' file:
  703.  
  704.      (add-hook 'w3-load-hooks '(lambda ()
  705.                                   (fset 'url-create-cached-filename
  706.                                         'url-create-cached-filename-using-md5)))
  707.  
  708.    If you will not be using other emacs variants, I highly recommend
  709. this method of creating the cache filename.
  710.  
  711. 
  712. File: w3.info,  Node: Searching,  Next: Interfacing to Mail/News,  Prev: Disk Caching,  Up: Advanced Features
  713.  
  714. Searching
  715. =========
  716.  
  717.    In the file `w3-search.el' is a function that some may find handy.
  718. It is not 100% completed yet, so if you run into any problems with it,
  719. please try to fix it, not just say its broken.
  720.  
  721.    The function is `w3-do-search'.  It must be called with at least one
  722. argument.  All others are optional.  Arguments are TERM, BASE,
  723. HOPS-LIMIT, and RESTRICTION.  This recursively descends all the child
  724. links of the current document for TERM.  TERM may be a string, in which
  725. case it is treated as a regular expression, and `re-search-forward' is
  726. used, or a symbol, in which case it is funcalled with 1 argument, the
  727. current URL being searched.
  728.  
  729.    BASE is the URL to start searching from.
  730.  
  731.    HOPS-LIMIT is the maximum number of nodes to descend before the
  732. search dies out.
  733.  
  734.    RESTRICTION is a regular expression or function to call with one
  735. argument, a URL that could be searched.  If RESTRICTION returns
  736. non-`nil', then the URL is added to the queue, otherwise it is
  737. discarded.  This is useful for restricting searching to either certain
  738. types of URLs (only search ftp links), or restricting searching to one
  739. domain (only search stuff in the indiana.edu domain).
  740.  
  741.    You may check several variables from the main `w3-do-search' routine
  742. in any functions passed to it (as RESTRICTION or TERM). QUEUE is the
  743. queue of links to be searched, HOPS is the current number of hops from
  744. the root document, RESULTS is an assoc list of (URL . RETVAL), where
  745. RETVAL is the value returned from previous calls to the TERM function
  746. (or point if searching for a regular expression).
  747.  
  748.    The function returns a list of the form: ((URL . RETVAL)...)
  749.  
  750.    Please note that there is no interactive use for this function
  751. yet--it was designed for non-interactive, batch-mode processing.
  752. However, if anyone wants to write a wrapper function for it, please feel
  753. free.
  754.  
  755. 
  756. File: w3.info,  Node: Interfacing to Mail/News,  Next: Debugging HTML,  Prev: Searching,  Up: Advanced Features
  757.  
  758. Interfacing to Mail/News
  759. ========================
  760.  
  761.    More and more people are including URLs in their signatures, and
  762. within the body of mail messages.  It can get quite tedious to type
  763. these into the minibuffer to follow one.
  764.  
  765.    To access URLs with VM, the following in your `~/.emacs' or `~/.vm'
  766. files should do the trick.  It adds two keybindings to the main VM
  767. message window.  The middle mouse button now tries to follow a
  768. hypertext link.
  769.  
  770.      (add-hook 'vm-mode-hook
  771.                (function
  772.                  (lambda ()
  773.                    (define-key vm-mode-map [mouse-2] 'w3-maybe-follow-link-mouse)
  774.                    (define-key vm-mode-map "\r"      'w3-maybe-follow-link))))
  775.  
  776.    To access URLs with RMAIL, the following in your `~/.emacs' file
  777. should do the trick.
  778.      (add-hook 'rmail-mode-hook
  779.            (function
  780.             (lambda ()
  781.               (define-key rmail-mode-map [mouse-2] 'w3-maybe-follow-link-mouse)
  782.               (define-key rmail-mode-map "\r"      'w3-maybe-follow-link))))
  783.  
  784.    To access URLs with GNUS, the following in your `~/.emacs' file
  785. should od the trick.
  786.      (add-hook 'gnus-article-mode-hook
  787.                (function
  788.                  (lambda ()
  789.                    (define-key gnus-article-mode-map [mouse-2]
  790.                                'w3-maybe-follow-link-mouse)
  791.                    (define-key gnus-article-mode-map "\r"
  792.                                'w3-maybe-follow-link))))
  793.  
  794.    NOTE: XEmacs 19.12 has a special version of VM and GNUS that does the
  795. highlighting of URLs automatically.  All that is required to follow one
  796. of these links is clicking the middle mouse button on the highlighted
  797. text.
  798.  
  799. 
  800. File: w3.info,  Node: Debugging HTML,  Next: Native WAIS Support,  Prev: Interfacing to Mail/News,  Up: Advanced Features
  801.  
  802. Debugging HTML
  803. ==============
  804.  
  805.    If you are feeling adventurous, or are just as anal as I am about
  806. people writing valid HTML, you can set the variable `w3-debug-html' to
  807. `t' and see what happens.
  808.  
  809.    If a emacs-w3 thinks it has encountered invalid HTML, then a
  810. debugging message is logged to the buffer specified by
  811. `w3-debug-buffer'.  This can be a buffer object, or the name of a
  812. buffer.
  813.  
  814.    NOTE: This has not yet been reintegrated into the new display engine
  815. and parser.
  816.  
  817. 
  818. File: w3.info,  Node: Native WAIS Support,  Next: Rating Links,  Prev: Debugging HTML,  Up: Advanced Features
  819.  
  820. Native WAIS Support
  821. ===================
  822.  
  823.    This version of Emacs-W3 supports native WAIS querying (earlier
  824. versions required the use of a gateway program).  In order to use the
  825. native WAIS support, a working "waisq" binary is required.  I recommend
  826. the distribution from think.com -
  827. ftp://think.com/wais/wais-8-b6.1.tar.Z is a good place to start.
  828.  
  829.    The variable `url-waisq-prog' must point to this executable, and one
  830. of `url-wais-gateway-server' or `url-wais-gateway-port' should be `nil'.
  831.  
  832.    When a WAIS URL is encountered, a form will be automatically
  833. generated and displayed.  After typing in your search term, the query
  834. will be sent to the server by running the `url-waisq-prog' in a
  835. subprocess.  The results will be converted into HTML and displayed.
  836.  
  837. 
  838. File: w3.info,  Node: Rating Links,  Next: Gopher Plus Support,  Prev: Native WAIS Support,  Up: Advanced Features
  839.  
  840. Rating Links
  841. ============
  842.  
  843.    The `w3-link-delimiter-info' variable can be used to 'rate' a URL
  844. when it shows up in an HTML page.  If non-`nil', then this should be a
  845. list specifying (or a symbol specifying the name) of a function.  This
  846. function should expect one argument, a fully specified URL, and should
  847. return a string.  This string is inserted after the link text.
  848.  
  849.    If a user has decided that all links served from blort.com are too
  850. laden with images, and wants to be warned that a link points at this
  851. host, they could do something like this:
  852.  
  853.      (defun check-url (url)
  854.        (if (string-match "://[^/]blort.com" url)
  855.           "[SLOW!]" ""))
  856.      
  857.      (setq w3-link-delimiter-info 'check-url)
  858.  
  859.    So that all links pointing to any site at blort.com shows up as "Some
  860. link[SLOW!]" instead of just "Some link".
  861.  
  862. 
  863. File: w3.info,  Node: Gopher Plus Support,  Next: Hooks,  Prev: Rating Links,  Up: Advanced Features
  864.  
  865. Gopher+ Support
  866. ===============
  867.  
  868.    The gopher+ support in Emacs-w3 is limited to the conversion of ASK
  869. blocks into HTML 3.0 forms, and the usage of the content-length given by
  870. the gopher+ server to give a nice status bar on the bottom of the
  871. screen.
  872.  
  873.    This will hopefully be extended to include the Gopher+ method of
  874. content-type negotiation, but this may be a while.
  875.  
  876. 
  877. File: w3.info,  Node: Hooks,  Next: Other Variables,  Prev: Gopher Plus Support,  Up: Advanced Features
  878.  
  879. Hooks
  880. =====
  881.  
  882.    These are the various hooks that can be used to customize some of
  883. Emacs-w3's behavior.  They are arranged in the order in which they would
  884. happen when retrieving a document.  All of these are functions (or lists
  885. of functions) that are called consecutively.
  886.  
  887. `w3-load-hooks'
  888.      These hooks are run by `w3-do-setup' the first time a URL is
  889.      fetched.  All the w3 variables are initialized before this hook is
  890.      run.
  891.  
  892. `w3-file-done-hooks'
  893.      These hooks are run by `w3-prepare-buffer' after all parsing on a
  894.      document has been done.  All `url-current-'* and `w3-current-'*
  895.      variables are initialized when this hook is run.  This is run
  896.      before the buffer is shown, and before any inlined images are
  897.      downloaded and converted.
  898.  
  899. `w3-file-prepare-hooks'
  900.      These hooks are run by `w3-prepare-buffer' before any parsing is
  901.      done on the HTML file.  The HTTP/1.0 headers specified by
  902.      `w3-show-headers' have been inserted, the syntax table has been set
  903.      to `w3-parse-args-syntax-table', and any personal annotations have
  904.      been inserted by the time this hook is run.
  905.  
  906. `w3-mode-hooks'
  907.      These hooks are run after a buffer has been parsed and displayed,
  908.      but before any inlined images are downloaded and converted.
  909.  
  910. `w3-source-file-hooks'
  911.      These hooks are run after displaying a document's source
  912.  
  913. 
  914. File: w3.info,  Node: Other Variables,  Prev: Hooks,  Up: Advanced Features
  915.  
  916. Miscellaneous variables
  917. =======================
  918.  
  919.    There are lots of variables that control the real nitty-gritty of
  920. Emacs-w3 that the beginning user probably shouldn't mess with.  Here
  921. they are.
  922.  
  923. `w3-icon-directory-list'
  924.      A list of directorys to look in for the w3 standard icons...  must
  925.      end in a /!  If the directory `data-directory'/w3 exists, then
  926.      this is automatically added to the default value of
  927.      http://cs.indiana.edu/elisp/w3/icons/.
  928.  
  929. `w3-keep-old-buffers'
  930.      Whether to keep old buffers around when following links.  If you
  931.      do not like having lots of buffers in one Emacs session, you
  932.      should set this to `nil'.  I recommend setting it to `t', so that
  933.      backtracking from one link to another is faster.
  934.  
  935. `url-passwd-entry-func'
  936.      This is a symbol indicating which function to call to read in a
  937.      password.  It is set up depending on whether you are running "EFS"
  938.      or "ange-ftp" at startup if it is `nil'.  This function should
  939.      accept the prompt string as its first argument, and the default
  940.      value as its second argument.
  941.  
  942. `w3-reuse-buffers'
  943.      Determines what happens when `w3-fetch' is called on a document
  944.      that has already been loaded into another buffer.  Possible values
  945.      are: `nil', `yes', and `no'.  `nil' will ask the user if Emacs-w3
  946.      should reuse the buffer (this is the default value).  A value of
  947.      `yes' means assume the user wants to always reuse the buffer.  A
  948.      value of `no' means assume the user always wants to re-fetch the
  949.      document.
  950.  
  951. `w3-show-headers'
  952.      This is a list of HTTP/1.0 headers to show at the end of a buffer.
  953.      All the headers should be in lowercase.  They are inserted at the
  954.      end of the buffer in a <UL> list.  Alternatively, if this is
  955.      simply `t', then all the HTTP/1.0 headers are shown.  The default
  956.      value is `nil'.
  957.  
  958. `w3-show-status, url-show-status'
  959.      Whether to show progress messages in the minibuffer.
  960.      `w3-show-status' controls if messages about the parsing are
  961.      displayed, and `url-show-status' controls if a running total of the
  962.      number of bytes transferred is displayed.  These Can cause a large
  963.      performance hit if using a remote X display over a slow link, or a
  964.      terminal with a slow modem.
  965.  
  966. `mm-content-transfer-encodings'
  967.      An assoc list of CONTENT-TRANSFER-ENCODINGS or CONTENT-ENCODINGS
  968.      and the appropriate decoding algorithms for each.  If the `cdr' of
  969.      a node is a list, then this specifies the decoder is an external
  970.      program, with the program as the first item in the list, and the
  971.      rest of the list specifying arguments to be passed on the command
  972.      line.  If using an external decoder, it must accept its input from
  973.      `stdin' and send its output to `stdout'.
  974.  
  975.      If the `cdr' of a node is a symbol whose function definition is
  976.      non-`nil', then that encoding can be handled internally.  The
  977.      function is called with 2 arguments, buffer positions bounding the
  978.      region to be decoded.  The function should completely replace that
  979.      region with the unencoded information.
  980.  
  981.      Currently supported transfer encodings are: base64, x-gzip, 7bit,
  982.      8bit, binary, x-compress, x-hqx, and quoted-printable.
  983.  
  984. `url-uncompressor-alist'
  985.      An assoc list of file extensions and the appropriate uncompression
  986.      programs for each.  This is used to build the Accept-encoding
  987.      header for HTTP/1.0 requests.
  988.  
  989. `url-waisq-prog'
  990.      Name of the waisq executable on this system.  This should be the
  991.      `waisq' program from think.com's wais8-b5.1 distribution.
  992.  
  993. 
  994. File: w3.info,  Node: More Help,  Next: Future Directions,  Up: Top
  995.  
  996. More Help
  997. *********
  998.  
  999.    If you need more help on Emacs-w3, please send me mail
  1000. (wmperry@spry.com).  Several discussion lists have also been created
  1001. for Emacs-w3.  To subscribe, send mail to majordomo@indiana.edu, with
  1002. the body of the message 'subscribe LISTNAME <YOUR EMAIL ADDRES>'.  All
  1003. other mail should go to <listname>@indiana.edu.
  1004.  
  1005.    * w3-announce - this list is for anyone interested in Emacs-w3, and
  1006.      should in general only be used by me.  The gnu.emacs.sources
  1007.      newsgroup and a few other mailing lists are included on this.  You
  1008.      may use this if you have written an enhancement to Emacs-w3 that
  1009.      you wish more people to know about.  (www-announce@w3.org is
  1010.      included on this list).
  1011.  
  1012.    * w3-beta - this list is for beta testers of Emacs-w3.  These brave
  1013.      souls test out not-quite stable code.
  1014.  
  1015.    * w3-dev - a list consisting of myself and a few other people who are
  1016.      interested in the internals of Emacs-w3, and doing active
  1017.      development work.  Pretty dead right now, but I hope it will grow.
  1018.  
  1019.    If you need more help on the World Wide Web in general, please refer
  1020. to the newsgroup comp.infosystems.www.  There are also several
  1021. discussion lists concerning the Web.  Send mail to listserv@w3.org with
  1022. a subject line of 'subscribe <listname>'.  All mail should go to
  1023. <listname>@w3.org.  Administrative mail should go to www-admin@w3.org.
  1024. The lists are:
  1025.  
  1026.    * www-talk - for general discussion of the World Wide Web, where its
  1027.      going, new features, etc.  All the major developers are subscribed
  1028.      to this list.
  1029.  
  1030.    * www-announce - for announcements concerning the World Wide Web.
  1031.      Server changes, new servers, new software, etc.
  1032.  
  1033.    As a last resort, you may always mail me.  I'll try to answer as
  1034. quickly as I can.
  1035.  
  1036. 
  1037. File: w3.info,  Node: Future Directions,  Next: Programming Interface,  Prev: More Help,  Up: Top
  1038.  
  1039. Future Directions
  1040. *****************
  1041.  
  1042.    Changes are constantly being made to the Emacs browser (hopefully all
  1043. for the better).  This is a list of the things that are being worked on
  1044. right now.
  1045.      Fix before 2.3
  1046.        1. Imagemap extensions (drag areas)
  1047.  
  1048.        2. PATHs
  1049.  
  1050.        3. TABLEs
  1051.  
  1052.        4. MATHs
  1053.  
  1054.        5. DSSSL and DSSSL-Lite Style sheets
  1055.  
  1056.      Long range goals
  1057.        1. Multi-DTD browsing
  1058.  
  1059. 
  1060. File: w3.info,  Node: Programming Interface,  Next: Generalized ZONES,  Prev: Future Directions,  Up: Top
  1061.  
  1062. Internals of Emacs-w3
  1063. *********************
  1064.  
  1065.    This chapter attempts to explain some of the internal workings of
  1066. Emacs-w3 and various data structures that are used.  It also details
  1067. some functions that are useful for using some of the Emacs-w3
  1068. functionality from within your own programs, or extending the current
  1069. capabilities of Emacs-w3.
  1070.  
  1071. * Menu:
  1072.  
  1073. * Generalized ZONES::           A generic interface to 'zones' of text
  1074.                                 that can contain information.
  1075. * Global Variables::            Global variables used throughout Emacs-w3
  1076. * Data Structures::             The various data structures used in Emacs-w3
  1077. * Miscellaneous Functions::     Miscellaneous functions you can use to
  1078.                                 interface with w3 and access its data
  1079.                                 structures
  1080. * MIME functions::              MIME functions--parsing messages,
  1081.                                 mailcap files, and more.
  1082.  
  1083. 
  1084. File: w3.info,  Node: Generalized ZONES,  Next: Global Variables,  Prev: Programming Interface,  Up: Programming Interface
  1085.  
  1086.    Programming Interface
  1087.  
  1088. Generalized ZONES
  1089. =================
  1090.  
  1091.    Due to the many different flavors of Emacs in existence, the
  1092. addition of data and font information to arbitrary regions of text has
  1093. been generalized.  The following functions are defined for
  1094. using/manipulating these "zones" of data.
  1095.  
  1096. `w3-add-zone (start end style data &optional highlight)'
  1097.      This function creates a zone between buffer positions start and
  1098.      end, with font information specified by style, and a data segment
  1099.      of data.  If the optional argument highlight is non-`nil', then
  1100.      the region highlights when the mouse moves over it.
  1101.  
  1102. `w3-zone-at (point)'
  1103.      Returns the the zone at POINT.  Preference is given to hypertext
  1104.      links, then to form entry areas, then to inlined images.  So if an
  1105.      inlined image was part of a hypertext link, this would always
  1106.      return the hypertext link.
  1107.  
  1108. `w3-zone-data (zone)'
  1109.      Returns the zone's data segment. The data structures used in
  1110.      Emacs-w3 are relatively simple.  They are just list structures
  1111.      that follow a certain format.  The two main data types are "form
  1112.      objects", "link objects",and "inlined images".  All the
  1113.      information for these types of links are stored as lists.
  1114.  
  1115. `w3-zone-hidden-p (zone)'
  1116.      Returns `t' if and only if a zone is currently invisible.
  1117.  
  1118. `w3-hide-zone (start end)'
  1119.      Makes a region of text from `start' to `end' invisible.
  1120.  
  1121. `w3-unhide-zone (start end)'
  1122.      Makes a region of text from `start' to `end' visible again.
  1123.  
  1124. `w3-zone-start (zone)'
  1125.      Returns an integer that is the start of zone, as a buffer
  1126.      position.  In Emacs 18.xx, this returns a marker instead of an
  1127.      integer, but it can be used just like an integer.
  1128.  
  1129. `w3-zone-end (zone)'
  1130.      Returns an integer that is the end of zone, as a buffer position.
  1131.      In Emacs 18.xx, this returns a marker instead of an integer, but
  1132.      it can be used just like an integer.
  1133.  
  1134. `w3-zone-eq (zone1 zone2)'
  1135.      Returns `t' if and only if zone1 and zone2 represent the same
  1136.      region of text in the same buffer, with the same properties and
  1137.      data.
  1138.  
  1139. `w3-delete-zone (zone)'
  1140.      Removes zone from its buffer (or current buffer).  The return
  1141.      value is irrelevant, and varies for each version of Emacs.
  1142.  
  1143. `w3-all-zones ()'
  1144.      Returns a list of all the zones contained in the current buffer.
  1145.      Useful for extracting information about hypertext links or form
  1146.      entry areas.  Programs should not rely on this list being sorted,
  1147.      as the order varies with each version of Emacs.
  1148.  
  1149. `w3-zone-at (pt)'
  1150.      This returns the zone at character position PT in the current
  1151.      buffer that is either a link or a forms entry area.  Returns `nil'
  1152.      if no link at point.  These data structures are what is generally
  1153. returned by `w3-zone-data'.
  1154.  
  1155. 
  1156. File: w3.info,  Node: Global Variables,  Next: Data Structures,  Prev: Generalized ZONES,  Up: Programming Interface
  1157.  
  1158. Global variables
  1159. ================
  1160.  
  1161.    There are also some variables that may be useful if you are writing a
  1162. program or function that interacts with Emacs-w3.  All of the
  1163. `w3-current-*' variables are local to each buffer.
  1164.  
  1165. `url-current-mime-headers'
  1166.      An assoc list of all the MIME headers for the current document.
  1167.      Keyed on the lowercase MIME header (e.g., `content-type' or
  1168.      `content-encoding'.
  1169.  
  1170. `url-current-server'
  1171.      Server that the current document was retrieved from.
  1172.  
  1173. `url-current-file'
  1174.      Filename of the current document
  1175.  
  1176. `url-current-type'
  1177.      A string representing what network protocol was used to retrieve
  1178.      the current buffer's document.  Can be one of http, gopher, file,
  1179.      ftp, news, or mailto.
  1180.  
  1181. `url-current-port'
  1182.      Port # of the current document.
  1183.  
  1184. `w3-current-last-buffer'
  1185.      The last buffer seen before this one.
  1186.  
  1187. `w3-running-FSF19'
  1188.      This is `t' if and only if we are running in FSF Emacs 19.
  1189.  
  1190. `w3-running-epoch'
  1191.      This is `t' if and only if we are running in Epoch 4.x
  1192.  
  1193. `w3-running-xemacs'
  1194.      This is `t' if and only if we are running in Lucid Emacs,
  1195.      WinEmacs, or XEmacs.
  1196.  
  1197.